package com.uzai.console.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.uzai.console.dto.reportpanel.DataPanelQueryDto;
import com.uzai.console.entity.ReportPanel;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * The interface Data panel mapper.
 */
@Repository
public interface DataPanelMapper {

    /**
     * Delete by id int.
     *
     * @param id    the id
     * @param merId the mer id
     * @return the int
     */
    int deleteById(@Param("id") Long id, @Param("merId") Long merId);

    /**
     * Insert int.
     *
     * @param record the record
     * @return the int
     */
    int insert(ReportPanel record);

    /**
     * Insert selective int.
     *
     * @param record the record
     * @return the int
     */
    int insertSelective(ReportPanel record);

    /**
     * Select by id report panel.
     *
     * @param id    the id
     * @param merId the mer id
     * @return the report panel
     */
    ReportPanel selectById(@Param("id") Long id, @Param("merId") Long merId);

    /**
     * Update by id selective int.
     *
     * @param record the record
     * @return the int
     */
    int updateByIdSelective(ReportPanel record);

    /**
     * Update by id int.
     *
     * @param record the record
     * @return the int
     */
    int updateById(ReportPanel record);

    /**
     * 分页查询
     *
     * @param page  the page
     * @param query the query
     * @return list
     */
    Page<ReportPanel> selectPageByCondition(Page<ReportPanel> page, @Param("query") DataPanelQueryDto query);

    /**
     * 查询所有
     *
     * @param query the query
     * @return list
     */
    List<ReportPanel> selectByCondition(@Param("query") DataPanelQueryDto query);
}